package com.example.leetcode;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2023-06-27
 * Time: 16:41
 */
public class Test1 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            System.out.println("t1");
        }, "t1");
        Thread t2 = new Thread(() -> {
            System.out.println("t2");
        }, "t2");
        t1.start();
        t2.start();
        t1.join();
        t2.join();
        System.out.println("main");
    }
}